package com.sugou.dao.support.ext.beans;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.sugou.dao.enums.ConditionsType;
import com.sugou.dao.support.Statement;
import com.sugou.dao.support.bean.CommonsStatement;
import com.sugou.dao.support.ext.EqConditions;

public class EqConditionsImpl implements EqConditions {
	private static final long serialVersionUID = 8152177428960051480L;

	private String name;
	
	private String value;
	
	private ConditionsType type;
	
	private List<Serializable> params;
	
	public EqConditionsImpl(String name,String value,ConditionsType type,List<Serializable> params) {
		this.name=name;
		this.value=value;
	}

	public Statement getBody() {
		return new CommonsStatement(this.name+"="+this.value);
	}

	public ConditionsType getType() {
		return this.type;
	}

	public List<? extends Serializable> getParams() {
		return new ArrayList<Serializable>(this.params);
	}

	public String getContent() {
		return this.name+"="+this.value;
	}

	public String getName() {
		return this.name;
	}

	public String getValue() {
		return this.value;
	}

}
